package cn.com.generaldata.os.ws.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.nutz.json.Json;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.com.generaldata.os.vo.ReportStatVO;
import cn.com.generaldata.os.ws.intf.ReportStatWSInterface;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/applicationContext-soap-client.xml" })
public class ReportStatWebServiceClient {

	@Autowired
	private ReportStatWSInterface reportStatWSInterface;

	@Test
	public void testCellReportStat() {
		ReportStatVO reportStatVO = new ReportStatVO();
		reportStatVO.setReportTypeId("20");
		reportStatVO.setFrequency(0);
		reportStatVO.setYear(2012);
		reportStatVO.setMonth(5);
		reportStatVO.setProvinceId("320000000000000");
		System.out.println(Json.toJson(reportStatWSInterface.reportStat(reportStatVO)));
	}

	@Test
	public void testRowReportStat() {
		ReportStatVO reportStatVO = new ReportStatVO();
		reportStatVO.setReportTypeId("100");
		reportStatVO.setFrequency(0);
		reportStatVO.setYear(2012);
		reportStatVO.setMonth(5);
		reportStatVO.setProvinceId("120000000000000");
		System.out.println(Json.toJson(reportStatWSInterface.reportStat(reportStatVO)));
	}

}
